<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* li:first-child{
            background: red;
        } */
        /* ul li:first-of-type{
            background: red;
        }
        li:last-of-type{
            background: blue;
        } */

        /* li:nth-of-type(3){
            background: red;
        }
        li:nth-last-of-type(2){
            background: blue;
        } */
        /* li:nth-of-type(odd){
            background: red;
        } */

        span:only-of-type{
            background: red;
        }
    </style>
</head>
<body>
    <ul>
        <span>hello</span>
        <li>li1</li>
        <li>li2</li>
        <li>li3</li>
        <li>li4</li>
        <li>li5</li>
        <li>li6</li>
        <li>li7</li>
        <li>li8</li>
        <!-- <span>world</span> -->
    </ul>

    <!-- <ol>
        <li>li1</li>
        <li>li2</li>
        <li>li3</li>
        <li>li4</li>
        <li>li5</li>
    </ol> -->
</body>
</html>